var webpack = require('webpack');
var _ = require('lodash');
var baseConfig = require('./base.config')
var path = require('path');

var config = _.merge(baseConfig, {
  output: {
    path: path.resolve(__dirname, '../app/web/build'),
    publicPath: 'build/',
    filename: '[name].js',
    chunkFilename: 'chunk.[id].js',
    pathinfo: true
  },
  devServer: {
    contentBase: './app/web',
    devtool: 'eval',
    port: 8080,
    hot: true,
    inline: true,
    proxy: {
      '*': {
        target: 'localhost:8080',
        host: 'http://10.1.1.61:8201',
        secure: false
      }
    }
  },
  plugins: [
    new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.bundle.js", Infinity),
  ].concat(baseConfig.plugins),
  devtool: 'source-map'
});

module.exports = config;
